Method for synchronization in a local area network including a store-and-forward device

ABSTRACT

The present invention relates to a method for identifying inaccurate time measurements in a local area network. The local area network comprises a sending device ( 2 ), such as a time client, a destination device ( 3 ), such as a timeserver, and a switching device and/or a store-and-forward device ( 6 ). A time request packet ( 4 ) is rejected if it arrives at the time client or timeserver within a given or calculated minimum distance from the preceding network packet. The time request packet ( 4 ) is also rejected if it falls outside a set of calculated error limits based on a set of estimates. Those estimates are kept in the time client memory and updated according to a given set of rules.

FIELD OF THE INVENTION

[0001] A method for identifying inaccurate time measurements in a localarea network incorporating a central switch and/or a store-and-forwarddevice.

BACKGROUND OF THE INVENTION

[0002] Several schemes exist for synchronizing a time-of-day clock inone node, such as a time client, to a reference time-of-day clock inanother node, such as a timeserver, over a local area network (LAN).Most of the time-of-day clocks attain their stated accuracy only when anetwork transfer delay between the time client and the timeserver isconstant. Introduction of switched Ethernet created a class of localarea networks where network capacity was greatly enhanced at the expenseof a predictable delay between the time one network node transmits atime request packet and the time the destination node receives it. Areason for this is that the link to the destination node may be busywith other packets when the aforesaid packet is ready to be placed onthat link. In such cases the packet is stored in the switch, whichtherefore is also a store-and-forward device, until the link to thedestination node is free.

SUMMARY OF THE INVENTION

[0003] The object of the invention is to provide a method foridentifying inaccurate time measurements in a local area networkincorporating a central switch and/or a store-and-forward device.

[0004] This object is achieved by a method according to the independentclaims 1 and 2.

[0005] A network incorporating a store-and-forward device, like theswitch in a switched Ethernet network, has two distinct sources ofdelay. The first source of delay is the connection from the sendingdevice, such as the time client, to the store-and-forward device and thesecond source of delay is the connection from the store-and-forwarddevice to the destination device, such as the time server 4. Thisinvention will address both sources, using two distinct algorithms.

BRIEF DESCRIPTION OF THE DRAWINGS

[0006]FIG. 1 is a schematic block diagram of a computer network, such asa LAN, comprising a time client, a timeserver and a central switchand/or a store-and forward device.

[0007]FIG. 2 shows an example of normal packet arrivals and queuedpacket arrivals.

[0008]FIG. 3 shows an example of accepting or rejecting a measurementbased on estimates.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0009]FIG. 1 shows a schematic block-diagram of a computer network 1,such as a local area network, comprising a time client 2 and atimeserver 3. A switching device and/or a store-and-forward device 6are/is in the path between the time client and the timeserver. A timerequest packet 4 is transmitted from the time client 2 to the timeserver3 and from the timeserver to the time client.

[0010] It is presupposed that the time request packets 4 are timestamped at the end of the time request packets. The reason for this isthat it is only ensured that a time request packet has been fullyreceived or transmitted at the end of the time request packet. If thetime request packet is time stamped before the end, the time requestpacket might be aborted before transmission or reception has beencompleted.

[0011] In the following examples the time client 2 is working as asending device and the timeserver 3 is working as a destination device.This should be seen as an example only. When the time request packet 4is transferred from the timeserver 3 to the time client 2 the timeserveris working as a sending device and the time client is working as adestination device

[0012] When a time request packet 4 is transmitted from thestore-and-forward device 6 to the timeserver 3, i.e. the destinationdevice, the time request packet might be stored in the store-and-forwarddevice 6 waiting for other packets to finish using the link to thetimeserver. The time request packet 4 will be sent as soon as possible.This means that it will be sent after the preceding packet followed by aspecified Minimum Interpacket Gap, shown in FIG. 2. The specifiedMinimum Interpacket Gap for Ethernet is given by the IEEE 802.3 and ISO8802/3 standards. Since the length of the time synchronization packet isknown as well as the length of the additional bits associated withpacket transmission, such as preamble, checksum etc., a minimum timedistance between the end of the preceding packet and the end of the timesynchronization packet may be calculated. The time distance between theend of the preceding packet and the end of the time request packet 4 ismeasured in the destination device, in this example the timeserver 3. Ifthe measured time distance is within a given tolerance of this minimumtime distance t, it is concluded that the time request packet 4 wasdelayed in the switch and/or the store-and-forward device and thereforethe time measurement associated with it will be inaccurate. The delayedpacket will not be used for time calculations. FIG. 2 shows an exampleof normal time request packet arrivals A and queued time request packetsarrival B.

[0013] If the measured time distance is greater than the MinimumInterpacket Gap the time request packet 4 has not been delayed in theswitch and/or store-and-forward device and the time stamps may be usedto synchronize the time client 2 and the time server 3.

[0014] If there are delays on the link from the sending device to thestore-and-forward device, an alternative procedure for validating thetime stamp accuracy must be used.

[0015]FIG. 3 shows how the time stamp accuracy is validated when it hasbeen a delay on the link 1 from the sending device, for example, thetime client 2, to the switching device and/or store-and-forward device.This procedure is based on a certain degree of confidence in the localtime-of-day clock. This confidence is expressed in four variables:estimated relative local frequency deviation dfR, estimated localfrequency accuracy d2fR, estimated local time precision dtP and aconfidence level. Start values for the estimated relative localfrequency deviation dfR and the estimated local frequency accuracy d2fRare stored in the time client when the time client is manufactured,together with a comparison value for the confidence level variable. Theconfidence level variable always starts at 0 and as long as it is lessthan the comparison value, there is a low confidence in the estimates.When the confidence level variable is greater than or equal to thecomparison value, there is a high confidence in the estimates.

[0016] When a new time adjustment tA is calculated from the time stamps,it is decided whether to keep the adjustment or reject it according to,for example, the following algorithm:

[0017] 1. First an upper acceptance level tH or a lower acceptance leveltL for the new time adjustment tA is calculated:

tB=tP+(tR−tP)*(1+dfR)

dtB=dtP+(tR−tP)*d 2 fR

tH=tB+dtB

tL=tB−dtB

[0018] where tP is the value of the local clock at a previously acceptedtime adjustment, tR is the value of the local clock at the current timerequest, dfR is the estimated relative local frequency deviation, dtP isthe estimated local time precision at the previously accepted timeadjustment and d2fR is the estimated local frequency accuracy at thesame point in time. The range between the upper acceptance level tH andthe lower acceptance level tL is called the error range.

[0019] 2. If tA falls within the error range, tA is accepted and used toupdate local time, estimated local frequency and estimated frequencydrift. In addition, the confidence level is increased up to a predefinedlimit.

[0020] 3. If there is a high confidence in our estimates and tA does notfall within the error range, tA is rejected and the confidence level inour estimates is decreased to a value greater than 0.

[0021] 4. If there is a low confidence in our estimates and tA does notfall within the error range, there are several options. A first optionis to reject tA, decrease the confidence level and hope for a better tAin the future.

[0022] A second option is to introduce a new set of estimates togetherwith a time-of-day offset. When the new set of estimates has beenintroduced every new time adjustment tA must be checked against everyset of estimates until one of the confidence levels becomes high. Atthat point in time, that set of estimates is kept and the others aredeleted. The next time adjustment tA will fulfill the requirements ineither the time client 2 or the timeserver 3.

1. Method for identifying inaccurate time measurements when running timesynchronization on a local area network, the local area networkcomprising a sending device (2), a destination device (3) and aswitching device and/or a store-and-forward device (6) arranged on apath (1) between the sending device (2) and the destination device (3),characterized by rejecting time request packets (4) that arrive to thedestination device (3) within a given time interval t from a precedingnetwork packet.
 2. Method for identifying inaccurate time measurementswhen running time synchronization on a local area network, the localarea network comprising a sending device (2), a destination device (3)and a switching device and/or a store-and-forward device (6) arranged ona path (1) between the sending device (2) and the destination device(3), characterized by keeping one or more estimates of the accuracy andprecision of the local time-of day clock in a memory in the sendingdevice (2) and accepting or rejecting the new time measurement based ona set of calculations made from these estimates.
 3. Method according toclaim 2, characterized in that the sending device (2) is a time client.